#define _CRT_SECURE_NO_WARNINGS 1


#include<string>
#include<iostream>

using namespace std;

int main()
{
	int n = 0;
	cin >> n;
	while (n--)
	{
		string s1, s2;
		cin >> s1 >> s2;
		int size = s1.size();
		for (int i = 0; i < size / 2; i++)
		{
			cout << s1[i];
		}
		cout << s2;
		for (int i = size / 2; i < size; i++)
		{
			cout << s1[i];
		}
		cout << endl;
	}

	return 0;
}